package ch6;

import java.io.*;

import ch3.Sex;
import ch3.Student;

public class Xuliehua {

	public static void main(String[] args) {
		// 序列化对象
		//

		// java.io.Serializable s = null;
		Student s = new Student("汪大翔", Sex.妖, 23);
		try {
			ObjectOutputStream oout = new ObjectOutputStream(new FileOutputStream("obj.txt"));
			oout.writeObject(s);
			oout.close();
			System.out.println("完成");
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
